diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-19 09:36:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-19 09:36:40 -0500 |
| commit | 1e66efe5169dfad9a0c62ba42fbf31ce977bf49e (patch) | |
| tree | 3c2ea81a8b2dd9ba989855de553d65b1bb90b7ad /src/app/groups/[groupId]/layout.tsx | |
| parent | 66ab0ff82bbcb3294d3a0fb84ae5ffcae9910e26 (diff) | |
Use modal dialogs for expense creation & edition (#10)
* First attemps at using route interception and modals
* Remove route interception
* Make it work
* Use Vaul on small screens
* Improve vaul
Diffstat (limited to 'src/app/groups/[groupId]/layout.tsx')
| -rw-r--r-- | src/app/groups/[groupId]/layout.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app/groups/[groupId]/layout.tsx b/src/app/groups/[groupId]/layout.tsx index 3e649e7..40f6155 100644 --- a/src/app/groups/[groupId]/layout.tsx +++ b/src/app/groups/[groupId]/layout.tsx @@ -5,12 +5,13 @@ import { getGroup } from '@/lib/api' import { Metadata } from 'next' import Link from 'next/link' import { notFound } from 'next/navigation' -import { PropsWithChildren } from 'react' +import { PropsWithChildren, ReactNode } from 'react' type Props = { params: { groupId: string } + modal: ReactNode } export async function generateMetadata({ @@ -28,6 +29,7 @@ export async function generateMetadata({ export default async function GroupLayout({ children, + modal, params: { groupId }, }: PropsWithChildren<Props>) { const group = await getGroup(groupId) @@ -47,6 +49,7 @@ export default async function GroupLayout({ </div> {children} + {modal} <SaveGroupLocally group={{ id: group.id, name: group.name }} /> </> |
